package org.gpf.po;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * 
* @ClassName: ArticleOutline 
* @Description: 文章概要
* @author gaopengfei
* @date 2015-9-29 下午1:20:10 
*
 */
public class ArticleOutline {

	private int id; 			// 文章id
	private String title; 		// 标题
	private String thumb; 		// 缩略图
	private String introduce;	// 简介
	
	public ArticleOutline() {
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getThumb() {
		return thumb;
	}

	public void setThumb(String thumb) {
		this.thumb = thumb;
	}

	public String getIntroduce() {
		return introduce;
	}

	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}

	@Override
	public String toString() {
		return "ArticleOutline [id=" + id + ", title=" + title + ", thumb="
				+ thumb + ", introduce=" + introduce + "]";
	}
	
	/**
	 * 根据查询结果集初始化属性
	 */
	public void initFieldsFromResultSet(ArticleOutline articleOutline,ResultSet rs) throws SQLException{
		
		articleOutline.setId(rs.getInt("id"));
		articleOutline.setIntroduce(rs.getString("introduce"));
		articleOutline.setThumb(rs.getString("thumb"));
		articleOutline.setTitle(rs.getString("title"));
	}
}
